class PatientDatasController < ApplicationController

  active_scaffold :patient_data do |config|
    config.columns = [
      :first_name,
      :laste_name,
      :pesel,
      :street,
      :street_number,
      :city,
      :zip_code,
      :email,
      :telpehone_number,
      :order_examinations,
#      :created_at,
#      :updated_at,
    ]
    
    columns[:first_name].label = "Imię"
    columns[:laste_name].label = "Nazwisko"
    columns[:pesel].label = "Pesel"
    columns[:street].label = "Ulica"
    columns[:street_number].label = "Numer"
    columns[:city].label = "Miasto"
    columns[:zip_code].label = "Kod zip"
    columns[:email].label = "Adres email"
    columns[:telpehone_number].label = "Numer telefonu"
    columns[:order_examinations].label = "Zlecenia na badanie"
#   columns[:created_at].label = "Utworzono"
#    columns[:updated_at].label = "Zmodyfikowano"


  end

  #
  #  def index
  #    @patient_datas = PatientData.all
  #
  #    respond_to do |format|
  #      format.html # index.html.erb
  #      format.xml  { render :xml => @patient_datas }
  #    end
  #  end
  #
  #  # GET /patient_datas/1
  #  # GET /patient_datas/1.xml
  #  def show
  #    @patient_data = PatientData.find(params[:id])
  #
  #    respond_to do |format|
  #      format.html # show.html.erb
  #      format.xml  { render :xml => @patient_data }
  #    end
  #  end
  #
  #  # GET /patient_datas/new
  #  # GET /patient_datas/new.xml
  #  def new
  #    @patient_data = PatientData.new
  #
  #    respond_to do |format|
  #      format.html # new.html.erb
  #      format.xml  { render :xml => @patient_data }
  #    end
  #  end
  #
  #  # GET /patient_datas/1/edit
  #  def edit
  #    @patient_data = PatientData.find(params[:id])
  #  end
  #
  #  # POST /patient_datas
  #  # POST /patient_datas.xml
  #  def create
  #    @patient_data = PatientData.new(params[:patient_data])
  #
  #    respond_to do |format|
  #      if @patient_data.save
  #        flash[:notice] = 'PatientData was successfully created.'
  #        format.html { redirect_to(@patient_data) }
  #        format.xml  { render :xml => @patient_data, :status => :created, :location => @patient_data }
  #      else
  #        format.html { render :action => "new" }
  #        format.xml  { render :xml => @patient_data.errors, :status => :unprocessable_entity }
  #      end
  #    end
  #  end
  #
  #  # PUT /patient_datas/1
  #  # PUT /patient_datas/1.xml
  #  def update
  #    @patient_data = PatientData.find(params[:id])
  #
  #    respond_to do |format|
  #      if @patient_data.update_attributes(params[:patient_data])
  #        flash[:notice] = 'PatientData was successfully updated.'
  #        format.html { redirect_to(@patient_data) }
  #        format.xml  { head :ok }
  #      else
  #        format.html { render :action => "edit" }
  #        format.xml  { render :xml => @patient_data.errors, :status => :unprocessable_entity }
  #      end
  #    end
  #  end
  #
  #  # DELETE /patient_datas/1
  #  # DELETE /patient_datas/1.xml
  #  def destroy
  #    @patient_data = PatientData.find(params[:id])
  #    @patient_data.destroy
  #
  #    respond_to do |format|
  #      format.html { redirect_to(patient_datas_url) }
  #      format.xml  { head :ok }
  #    end
  #  end
end
